<!--
 * @Author: yan_hai_dong 891236760@qq.com
 * @Date: 2022-08-15 17:16:50
 * @LastEditors: yan_hai_dong 891236760@qq.com
 * @LastEditTime: 2022-08-15 18:58:19
 * @FilePath: \app\src\views\el\css\button\index.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div>
    <p>自定义按钮旋转加载效果</p>
    <MyButton @click="isLoading" :loading="loading">按 钮</MyButton>
  </div>
</template>

<script>
import MyButton from "@/components/MyButton";
export default {
  components: {
    MyButton,
  },
  data() {
    return {
      loading: false,
    };
  },

  methods: {
    isLoading() {
      this.loading = true;
      setTimeout(() => {
        this.loading = false;
      }, 1000 * 2);
    },
  },
};
</script>

<style lang="less" scoped>
</style>